<html>
<head><meta charset="utf-8"><title>sub-crate backend switching · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html">sub-crate backend switching</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="243266574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243266574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243266574">(Jun 19 2021 at 20:06)</a>:</h4>
<p>Hello!</p>
<p>I was wondering if there has ever been any work done or if its been discussed the ability to dynamically switch out rustc backends for specific functions? It would be great to be able to create inline shaders with something like rust-gpu or (once rustc can do this) compile specific functions to ptx to be run similar to CUDA C++.</p>



<a name="243266661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243266661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243266661">(Jun 19 2021 at 20:08)</a>:</h4>
<p>perhaps through a special proc macro such as <code>#[backend = "rust-gpu"]</code> or <code>#[backend(target = "nvptx64-nvidia-cuda"))]</code>. However, this would probably require some changes in the internal backend API as well as some bikeshedding to dictate how this should actually behave and where it generates code</p>



<a name="243270350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270350">(Jun 19 2021 at 21:38)</a>:</h4>
<p>Inline shaders for rust-gpu would work with <code>#[cfg(target_arch)]</code> already I think. Per-function backend switching won't help as cpu and gpu code use different targets and you can only have a single target per compilation session. (macro expansion and eg type layout depend on the specific target)</p>



<a name="243270506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270506">(Jun 19 2021 at 21:42)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> yeah i forgot about cfg :/<br>
But how would inline shaders work? wouldnt u have to recompile everything twice</p>



<a name="243270528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270528">(Jun 19 2021 at 21:43)</a>:</h4>
<p>Yes, you have to do that anyway as every function can in principle be used by both the cpu code and the shader. When compiling dependencies it is not known yet who uses it.</p>



<a name="243270536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270536">(Jun 19 2021 at 21:43)</a>:</h4>
<p>cant you figure that out in the codegen?</p>



<a name="243270587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270587">(Jun 19 2021 at 21:44)</a>:</h4>
<p>ah but that would require per-function switching haha</p>



<a name="243270622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270622">(Jun 19 2021 at 21:45)</a>:</h4>
<p>One thing that might be interesting to explore in the future is an NVVM backend, NVVM IR is a subset of LLVM IR that can be fed to libnvvm to produce very efficient gpu code, it's what cuda C++ uses</p>



<a name="243270667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270667">(Jun 19 2021 at 21:46)</a>:</h4>
<p>In addition how would you handle typechecking of <code>let foo: [u8; size_of::&lt;Foo&gt;] = [0];</code>? The size of <code>Foo</code> may depend on if it is compiled for the cpu or gpu.</p>



<a name="243270668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270668">(Jun 19 2021 at 21:46)</a>:</h4>
<p>It might be possible to literally just rip out the debug and unwinding parts of the llvm codegen and feed the llvm ir to nvvm, but im not sure</p>



<a name="243270674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270674">(Jun 19 2021 at 21:46)</a>:</h4>
<p>sadly rust cant be compiled to nvptx64 on windows because of some llvm dylib thing...</p>



<a name="243270685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270685">(Jun 19 2021 at 21:47)</a>:</h4>
<p>Yeah makes sense, rust has too much utility for target-specific things that this isnt possible</p>



<a name="243270689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270689">(Jun 19 2021 at 21:47)</a>:</h4>
<p>Yeah compiling to native (vendor specific) gpu shader code using LLVM is an option.</p>



<a name="243270731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270731">(Jun 19 2021 at 21:48)</a>:</h4>
<p>i dont think llvm can compile to spirv or something like it, i know it can compile to ptx though, that u can run using the cuda driver api</p>



<a name="243270739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270739">(Jun 19 2021 at 21:48)</a>:</h4>
<p>Rust-gpu doesn't use LLVM as the SPIR-V backend of LLVM is supposedly unable to handle most LLVM ir emitted by rustc.</p>



<a name="243270742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270742">(Jun 19 2021 at 21:48)</a>:</h4>
<p>but if you try to compile for nvptx64-nvidia-cuda on windows and use nvptx intrinsics you get some really nice linker errors :)</p>



<a name="243270757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270757">(Jun 19 2021 at 21:48)</a>:</h4>
<p>also, NVVM has gpu-specific optimizations llvm doesnt have</p>



<a name="243270768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270768">(Jun 19 2021 at 21:49)</a>:</h4>
<p>this is what im talking about <a href="https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html">https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html</a></p>



<a name="243270777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270777">(Jun 19 2021 at 21:49)</a>:</h4>
<p>The issue is that rustc 100% emits LLVM IR that is not compatible with NVVM IR</p>



<a name="243270851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270851">(Jun 19 2021 at 21:50)</a>:</h4>
<p>So a special nvvm codegen would probably need to be written, perhaps using llvm for its builder functions but just not doing some things that are restricted</p>



<a name="243270981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243270981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243270981">(Jun 19 2021 at 21:54)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> do you know of any resources to understand how rustc codegen backends work? anything that helped u write the cranelift one? ;)</p>



<a name="243277530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243277530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243277530">(Jun 20 2021 at 00:42)</a>:</h4>
<p><span class="user-mention" data-user-id="276242">@Riccardo D'Ambrosio</span> For shader compilation, you might also look at the artifact dependencies RFC.</p>



<a name="243277536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243277536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243277536">(Jun 20 2021 at 00:43)</a>:</h4>
<p>Interesting</p>



<a name="243277588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243277588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243277588">(Jun 20 2021 at 00:44)</a>:</h4>
<p>Im mostly concerned with cuda right now, its just much easier and better for what i make and shaders usually perform worse, so being able to compile rust to nvvm ir would be my ultimate goal</p>



<a name="243277605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243277605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243277605">(Jun 20 2021 at 00:44)</a>:</h4>
<p>I might explore if making a new codegen or forking the existing llvm one to work with nvvm restrictions may work</p>



<a name="243287186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243287186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243287186">(Jun 20 2021 at 05:21)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> do you know of any resources to understand how rustc codegen backends work? anything that helped u write the cranelift one? ;)</p>
</blockquote>
<p>Reading the source of cg_ssa/llvm amd miri.</p>



<a name="243289880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243289880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243289880">(Jun 20 2021 at 06:47)</a>:</h4>
<p>miri? interesting, im currently reading the rustc-codegen-llvm code</p>



<a name="243289926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243289926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243289926">(Jun 20 2021 at 06:48)</a>:</h4>
<p>the nice thing is an NVVM backend is basically just subtractive development on the llvm codegen because its a subset of llvm ir. Although ill start from scratch and take bits from the llvm codegen if i need to</p>



<a name="243289933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243289933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243289933">(Jun 20 2021 at 06:49)</a>:</h4>
<p>last time i read the backend's source code, im pretty sure cg_ssa didnt exist, this makes things so much easier <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="243290877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243290877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243290877">(Jun 20 2021 at 07:21)</a>:</h4>
<p>It is sometimes easier to read miri to understand how a mir construct or intrinsic works than to read cg_ssa as the code is often cleaner.</p>



<a name="243291687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243291687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243291687">(Jun 20 2021 at 07:46)</a>:</h4>
<p>i see</p>



<a name="243291694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243291694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243291694">(Jun 20 2021 at 07:47)</a>:</h4>
<p>it seems with cg_ssa i dont have to worry about mir -&gt; ir which is nice</p>



<a name="243340121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243340121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243340121">(Jun 21 2021 at 05:00)</a>:</h4>
<p>I think it still makes sense to select codegen on crate boundaries.</p>



<a name="243340129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243340129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243340129">(Jun 21 2021 at 05:00)</a>:</h4>
<p>Rather than intra-crate boundaries.</p>



<a name="243342434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/sub-crate%20backend%20switching/near/243342434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/sub-crate.20backend.20switching.html#243342434">(Jun 21 2021 at 05:58)</a>:</h4>
<p>yeah, crates are codegen units.<br>
maybe the thing that's really needed is making it possible to define inline crates.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>